<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('个人用户信息维护')" />
</head>
<body class="white-bg">

	<style>
		input{
			text-align: center;
		}
		select{
			text-align: center;
		}
	</style>

	<div class="container-div" id="customedit">

		<input name="userid" th:value="${session.userid}" type="hidden" id="userid">
		<input name="username" th:value="${session.username}" type="hidden" id="username">
		<input name="deptid" th:value="${session.deptid}" type="hidden" id="deptid">
		<input name="olddeptid" th:value="${session.olddeptid}" type="hidden" id="olddeptid">
		<input name="jigoujibie" th:value="${session.jigoujibie}" type="hidden" id="jigoujibie">
		<input name="roleid" th:value="${session.roleid}" type="hidden" id="roleid">

		<div class="row">

			<!--个人信息维护-->
			<form class="col-sm-6 form-horizontal">

				<div class="form-group" style="text-align: center">
					<h2 class="col-sm-12">个人信息</h2>
				</div>

				<div class="form-group">
					<label class="col-sm-3 control-label is-required">登录账号：</label>
					<div class="col-sm-8">
						<input v-model="userItem.loginName"  placeholder="请输入登录账号" class="form-control" type="text" maxlength="30" required disabled>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label is-required">用户名称：</label>
					<div class="col-sm-8">
						<input v-model="userItem.userName" name="userName" placeholder="请输入用户名称" class="form-control" type="text" maxlength="30" required>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label">所属部门：</label>
					<div class="col-sm-8">
						<input v-model="userItem.text1" class="form-control " type="text" placeholder="请输入所属部门">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label">手机：</label>
					<div class="col-sm-8">
						<input v-model="userItem.phonenumber"  placeholder="请输入手机号码" class="form-control" type="text" maxlength="11">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label">办公电话：</label>
					<div class="col-sm-8">
						<input v-model="userItem.text2" class="form-control" type="text" placeholder="请输入办公电话">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label">邮箱：</label>
					<div class="col-sm-8">
						<input v-model="userItem.email" class="form-control email" type="text" maxlength="50" placeholder="请输入邮箱">
					</div>
				</div>

				<div class="form-group">
					<div class="col-sm-12" style="text-align: center">
						<button type="button" class="btn btn-warning btn-rounded btn-md" @click="saveUser">保存个人信息</button>
						<button class="btn btn-warning btn-rounded btn-md" @click="resetPwd(userItem)">修改密码</button>
					</div>
				</div>
			</form>

			<!--单位信息维护-->
			<form class="col-sm-6 form-horizontal">

				<div class="form-group" style="text-align: center">
					<h2 class="col-sm-12">单位信息</h2>
				</div>

				<div class="form-group">
					<label class="col-sm-3 control-label is-required">单位名称：</label>
					<div class="col-sm-8">
						<input class="form-control" type="text" name="jigoumingcheng" v-model="dept.jigoumingcheng" required>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label">单位类型：</label>
					<div class="col-sm-8">
						<select name="jigouleixing" th:with="type=${@dict.getType('sys_jigouleixing')}" v-model="dept.jigouleixing" class="form-control" type="text">
							<option value="">请选择</option>
							<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
						</select>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label">地区：</label>
					<div class="col-sm-4">
						<select id="beizhu1" name="beizhu1" th:with="type=${@dict.getType('sys_diqu')}" v-model="dept.beizhu1" class="form-control" type="text">
							<option value="">请选择</option>
							<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"></option>
						</select>
					</div>
					<div class="col-sm-3">
						<input class="form-control" type="text" name="diqusearch" v-model="diqusearch" >
					</div>
					<div class="col-sm-1">
						<input type="button" class="btn btn-success btn-md" value="搜索" @click="searchdiqu()">
					</div>
				</div>
<!--				<div class="form-group">
					<label class="col-sm-3 control-label">省份：</label>
					<div class="col-sm-8">
						<select name="shengfen" v-model="dept.shengfen" class="form-control" type="text">
							<option value="">请选择</option>
						</select>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label">城市：</label>
					<div class="col-sm-8">
						<select name="chengshi" v-model="dept.chengshi" class="form-control" type="text">
							<option value="">请选择</option>
						</select>
					</div>
				</div>-->
				<div class="form-group">
					<label class="col-sm-3 control-label">地址：</label>
					<div class="col-sm-8">
						<input class="form-control" type="text" name="dizhi" v-model="dept.dizhi">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label">邮编：</label>
					<div class="col-sm-8">
						<input class="form-control" type="text" name="youbian" v-model="dept.youbian">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label">传真号码：</label>
					<div class="col-sm-8">
						<input class="form-control" type="text" name="chuanzhenghaoma" v-model="dept.chuanzhenghaoma">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label">电子邮件：</label>
					<div class="col-sm-8">
						<input class="form-control" type="text" name="dianziyoujian" v-model="dept.dianziyoujian">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label is-required">经办人：</label>
					<div class="col-sm-8">
						<input class="form-control" type="text" name="jingbanren" v-model="dept.jingbanren">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label is-required">经办人办公电话：</label>
					<div class="col-sm-8">
						<input class="form-control" type="text" name="jingbanrenbangongdianhua" v-model="dept.jingbanrenbangongdianhua">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label is-required">经办人手机号码：</label>
					<div class="col-sm-8">
						<input class="form-control" type="text" name="jingbanrenshoujihaoma" v-model="dept.jingbanrenshoujihaoma">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label">负责人：</label>
					<div class="col-sm-8">
						<input class="form-control" type="text" name="fuzeren" v-model="dept.fuzeren">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label">负责人办公电话：</label>
					<div class="col-sm-8">
						<input class="form-control" type="text" name="fuzerenbangongdianhua" v-model="dept.fuzerenbangongdianhua">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label">负责人手机号码：</label>
					<div class="col-sm-8">
						<input class="form-control" type="text" name="fuzerenshoujihaoma" v-model="dept.fuzerenshoujihaoma">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label is-required">财务联系人：</label>
					<div class="col-sm-8">
						<input class="form-control" type="text" name="caiwulianxiren" v-model="dept.caiwulianxiren">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label is-required">财务办公电话：</label>
					<div class="col-sm-8">
						<input class="form-control" type="text" name="caiwubangongdianhua" v-model="dept.caiwubangongdianhua">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label is-required">财务手机号码：</label>
					<div class="col-sm-8">
						<input class="form-control" type="text" name="caiwushoujihaoma" v-model="dept.caiwushoujihaoma">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label is-required">开户行：</label>
					<div class="col-sm-8">
						<input class="form-control" type="text" name="kaihuhang" v-model="dept.kaihuhang">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label is-required">开户名称：</label>
					<div class="col-sm-8">
						<input class="form-control" type="text" name="kaihumingcheng" v-model="dept.kaihumingcheng">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label is-required">银行帐号：</label>
					<div class="col-sm-8">
						<input class="form-control" type="text" name="yinhangzhanghao" v-model="dept.yinhangzhanghao">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label">银行地址：</label>
					<div class="col-sm-8">
						<input class="form-control" type="text" name="yinhangdizhi" v-model="dept.yinhangdizhi">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label">联行号：</label>
					<div class="col-sm-8">
						<input class="form-control" type="text" name="lianhanghao" v-model="dept.lianhanghao">
					</div>
				</div>

				<div class="form-group" v-if="roleid=='100'||roleid=='102'||roleid=='1'">
					<div class="col-sm-12" style="text-align: center">
						<button type="button" class="btn btn-warning btn-rounded btn-md" @click="save">保存单位信息</button>
					</div>
				</div>
			</form>
		</div>
	</div>

	<th:block th:include="include :: footer" />
	<script th:src="@{/js/system/deptdetail/customedit.js?v=1.1}"></script>

</body>
</html>
